﻿/*
 * EmeCoder v1.2.1.168
 * 作者：Administrator/PC4APPLE
 * 时间：2013-12-24 15:52:16
 * 版权：版权所有 (C) Eme Development Team 2013
*/

﻿using System;
using System.ComponentModel;
using HmFramework.Data;
using HmFramework.Data.Configuration;
using HmFramework.Data.DataAccessLayer;

namespace CuteSprite.Eme.Data.CRM
{
	/// <summary>运单号回收</summary>
	[Serializable]
	[DataObject]
	[Description("运单号回收")]
	[BindIndex("IX_DiscardedExpress_Category_No", true, "ExpressCategory,ExpressNo")]
	[BindIndex("PK__DiscardedExpressNoID__E21C1A5F22BF2040", true, "ID")]
	[BindTable("DiscardedExpressNo", Description = "运单号回收", ConnName = "EmeCRM", DbType = DatabaseType.SqlServer)]
	public abstract partial class DiscardedExpressNo<TEntity> : IDiscardedExpressNo
	{
		#region 属性

		private Int32 _ID;

		/// <summary>主键</summary>
		[DisplayName("主键")]
		[Description("主键")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(0, "ID", "主键", null, "int", 10, 0, false)]
		public virtual Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } }
		}

		private Int32 _ExpressCategory;

		/// <summary>运单类别</summary>
		[DisplayName("运单类别")]
		[Description("运单类别")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "ExpressCategory", "运单类别", null, "int", 10, 0, false)]
		public virtual Int32 ExpressCategory
		{
			get { return _ExpressCategory; }
			set { if (OnPropertyChanging(__.ExpressCategory, value)) { _ExpressCategory = value; OnPropertyChanged(__.ExpressCategory); } }
		}

		private String _ExpressNo;

		/// <summary>运单号</summary>
		[DisplayName("运单号")]
		[Description("运单号")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(3, "ExpressNo", "运单号", null, "nvarchar(20)", 0, 0, true)]
		public virtual String ExpressNo
		{
			get { return _ExpressNo; }
			set { if (OnPropertyChanging(__.ExpressNo, value)) { _ExpressNo = value; OnPropertyChanged(__.ExpressNo); } }
		}

		#endregion

		#region 获取/设置 字段值

		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case __.ID: return _ID;
					case __.ExpressCategory: return _ExpressCategory;
					case __.ExpressNo: return _ExpressNo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case __.ID: _ID = Convert.ToInt32(value); break;
					case __.ExpressCategory: _ExpressCategory = Convert.ToInt32(value); break;
					case __.ExpressNo: _ExpressNo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}

		#endregion

		#region 字段名

		/// <summary>取得运单号回收字段信息的快捷方式</summary>
		public partial class _
		{
			///<summary>主键</summary>
			public static readonly Field ID = FindByName(__.ID);

			///<summary>运单类别</summary>
			public static readonly Field ExpressCategory = FindByName(__.ExpressCategory);

			///<summary>运单号</summary>
			public static readonly Field ExpressNo = FindByName(__.ExpressNo);

			private static Field FindByName(String name)
			{
				return Meta.Table.FindByName(name);
			}
		}

		/// <summary>取得运单号回收字段名称的快捷方式</summary>
		public partial class __
		{
			///<summary>主键</summary>
			public const String ID = "ID";

			///<summary>运单类别</summary>
			public const String ExpressCategory = "ExpressCategory";

			///<summary>运单号</summary>
			public const String ExpressNo = "ExpressNo";
		}

		#endregion
	}

	/// <summary>运单号回收接口</summary>
	public partial interface IDiscardedExpressNo
	{
		#region 属性

		/// <summary>主键</summary>
		Int32 ID { get; set; }

		/// <summary>运单类别</summary>
		Int32 ExpressCategory { get; set; }

		/// <summary>运单号</summary>
		String ExpressNo { get; set; }

		#endregion

		#region 获取/设置 字段值

		/// <summary>获取/设置 字段值。</summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		Object this[String name] { get; set; }

		#endregion
	}
}